// app.js

App({  
  towxml:require('/towxml/index'),
  //katex: require('/katex/katex.min'),
  katex:require('/miniprogram_npm/katex/index'),

  onLaunch() {
    const apiKey = wx.getStorageSync('apiKey');
    if (apiKey) {
      wx.switchTab({
        url: '/pages/index/index' // 假设 index 是 tabBar 页面
      });
    } else {
      wx.navigateTo({
        url: '/pages/setting/setting'
      });
    }
  }
});

  
